package com.fbli.test.service;

import com.fbli.test.common.entity.project.ProjectAddReqMsg;
import com.fbli.test.common.entity.project.ProjectReqConditionQuery;
import com.fbli.test.common.entity.project.ProjectResMsg;
import com.fbli.test.entity.Project;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectService {
    /**
     * 获取所有用户项目并分页
     *
     * @param userId
     * @return
     */
    ProjectResMsg getProjects(long userId, int page, int size);

    /**
     * 根据项目id获取用户项目数据
     *
     * @param userId
     * @param projectId
     * @return
     */
    List<Project> getById(long userId, long projectId);

    /**
     * 新增项目
     *
     * @param userId
     * @param msg
     * @return
     */
    boolean addProject(long userId, ProjectAddReqMsg msg);

    /**
     * 编辑项目
     *
     * @param userId
     * @param msg
     * @return
     */
    boolean editProject(long userId, ProjectAddReqMsg msg);

    /**
     * 删除项目（假删）
     *
     * @param userId
     * @param projectIdList
     * @return
     */
    boolean delete(long userId, List<Long> projectIdList);

    /**
     * 根据项目id或项目名称条件查询
     * @param projectReqConditionQuery
     * @return
     */
    ProjectResMsg selectByIdOrByName(ProjectReqConditionQuery projectReqConditionQuery);
}
